package review.dao;

import java.util.List;

import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.query.Param;
import org.springframework.stereotype.Repository;


import review.entity.Menu;

@Repository
public interface MenuDAO extends JpaRepository<Menu,Integer> {
	@Query("select bean from Menu bean where roles like CONCAT('%',:role,'%') ORDER BY orderindex")
	List<Menu> findByRole(@Param("role")String role);
}
